<!DOCTYPE html>


<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>CryptoUtils_test Module &mdash; vsmartcard 2017-01-16 documentation</title>
    
    <link rel="stylesheet" href="../../_static/basic.css" type="text/css" />
    <link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
    <link rel="stylesheet" href="../../_static/bootswatch-3.3.4/flatly/bootstrap.min.css" type="text/css" />
    <link rel="stylesheet" href="../../_static/bootstrap-sphinx.css" type="text/css" />
    
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '../../',
        VERSION:     '2017-01-16',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="../../_static/jquery.js"></script>
    <script type="text/javascript" src="../../_static/underscore.js"></script>
    <script type="text/javascript" src="../../_static/doctools.js"></script>
    <script type="text/javascript" src="../../_static/js/jquery-1.11.0.min.js"></script>
    <script type="text/javascript" src="../../_static/js/jquery-fix.js"></script>
    <script type="text/javascript" src="../../_static/bootstrap-3.3.4/js/bootstrap.min.js"></script>
    <script type="text/javascript" src="../../_static/bootstrap-sphinx.js"></script>
    <link rel="shortcut icon" href="../../_static/chip.ico"/>
    <link rel="top" title="vsmartcard 2017-01-16 documentation" href="../../index.html" />
    <link rel="up" title="tests Package" href="virtualsmartcard.tests.html" />
    <link rel="next" title="SmartcardSAM_test Module" href="virtualsmartcard.tests.SmartcardSAM_test.html" />
    <link rel="prev" title="CardGenerator_test Module" href="virtualsmartcard.tests.CardGenerator_test.html" />
<meta charset='utf-8'>
<meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'>
<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1'>
<meta name="apple-mobile-web-app-capable" content="yes">

  </head>
  <body>
  
  <a href="https://github.com/frankmorgner/vsmartcard"
     class="visible-desktop hidden-xs"><img
    id="gh-banner"
    style="position: absolute; top: 50px; right: 0; border: 0;"
    src="https://s3.amazonaws.com/github/ribbons/forkme_right_white_ffffff.png"
    alt="Fork me on GitHub"></a>
  <script>
    // Adjust banner height.
    $(function () {
      var navHeight = $(".navbar .container").css("height");
      $("#gh-banner").css("top", navHeight);
    });
  </script>


  <div id="navbar" class="navbar navbar-default ">
    <div class="container">
      <div class="navbar-header">
        <!-- .btn-navbar is used as the toggle for collapsed navbar content -->
        <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".nav-collapse">
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
        </button>
        <a class="navbar-brand" href="../../index.html">
          vsmartcard</a>
        <span class="navbar-text navbar-version pull-left"><b></b></span>
      </div>

        <div class="collapse navbar-collapse nav-collapse">
          <ul class="nav navbar-nav">
            
            
              <li class="dropdown globaltoc-container">
  <a role="button"
     id="dLabelGlobalToc"
     data-toggle="dropdown"
     data-target="#"
     href="../../index.html">Site <b class="caret"></b></a>
  <ul class="dropdown-menu globaltoc"
      role="menu"
      aria-labelledby="dLabelGlobalToc"><ul>
<li class="toctree-l1"><a class="reference internal" href="../README.html">Virtual Smart Card</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../remote-reader/README.html">Remote Smart Card Reader</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../ACardEmulator/README.html">Android Smart Card Emulator</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../TCardEmulator/README.html">Tizen Smart Card Emulator</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../pcsc-relay/README.html">PC/SC Relay</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../ccid/README.html">USB CCID Emulator</a></li>
</ul>
<ul class="current">
<li class="toctree-l1 current"><a class="reference internal" href="../api.html">Creating a Virtual Smart Card</a></li>
</ul>
</ul>
</li>
              
                <li class="dropdown">
  <a role="button"
     id="dLabelLocalToc"
     data-toggle="dropdown"
     data-target="#"
     href="#">Page <b class="caret"></b></a>
  <ul class="dropdown-menu localtoc"
      role="menu"
      aria-labelledby="dLabelLocalToc"><ul>
<li><a class="reference internal" href="#">CryptoUtils_test Module</a></li>
</ul>
</ul>
</li>
              
            
            
              
                
  <li>
    <a href="virtualsmartcard.tests.CardGenerator_test.html" title="Previous Chapter: CardGenerator_test Module"><span class="glyphicon glyphicon-chevron-left visible-sm"></span><span class="hidden-sm hidden-tablet">&laquo; CardGenerator_te...</span>
    </a>
  </li>
  <li>
    <a href="virtualsmartcard.tests.SmartcardSAM_test.html" title="Next Chapter: SmartcardSAM_test Module"><span class="glyphicon glyphicon-chevron-right visible-sm"></span><span class="hidden-sm hidden-tablet">SmartcardSAM_tes... &raquo;</span>
    </a>
  </li>
              
            
            
            
            
              <li class="hidden-sm"></li>
            
          </ul>

          
            
<form class="navbar-form navbar-right" action="../../search.html" method="get">
 <div class="form-group">
  <input type="text" name="q" class="form-control" placeholder="Search" />
 </div>
  <input type="hidden" name="check_keywords" value="yes" />
  <input type="hidden" name="area" value="default" />
</form>
          
        </div>
    </div>
  </div>

<div class="container">
  <div class="row">
    <div class="col-md-12 content">
      
  <div class="section" id="cryptoutils-test-module">
<h1>CryptoUtils_test Module<a class="headerlink" href="#cryptoutils-test-module" title="Permalink to this headline">¶</a></h1>
<p class="graphviz">
<img src="../../_images/inheritance-8d7ae2bc5a5efc5bac682034d18967034c43784c.png" alt="Inheritance diagram of virtualsmartcard.tests.CryptoUtils_test" usemap="#inheritance34477d81d3" class="inheritance"/>
<map id="inheritance34477d81d3" name="inheritance34477d81d3">
<area shape="rect" id="node1" title="A class whose instances are single test cases." alt="" coords="5,5,172,31"/>
<area shape="rect" id="node2" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils" title="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils" alt="" coords="220,5,591,31"/>
</map>
</p>
<span class="target" id="module-virtualsmartcard.tests.CryptoUtils_test"></span><dl class="class">
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils">
<em class="property">class </em><tt class="descclassname">virtualsmartcard.tests.CryptoUtils_test.</tt><tt class="descname">TestCryptoUtils</tt><big>(</big><em>methodName='runTest'</em><big>)</big><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">unittest.case.TestCase</span></tt></p>
<dl class="method">
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils._addSkip">
<tt class="descname">_addSkip</tt><big>(</big><em>result</em>, <em>reason</em><big>)</big><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils._addSkip" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils._baseAssertEqual">
<tt class="descname">_baseAssertEqual</tt><big>(</big><em>first</em>, <em>second</em>, <em>msg=None</em><big>)</big><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils._baseAssertEqual" title="Permalink to this definition">¶</a></dt>
<dd><p>The default assertEqual implementation, not type specific.</p>
</dd></dl>

<dl class="attribute">
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils._classSetupFailed">
<tt class="descname">_classSetupFailed</tt><em class="property"> = False</em><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils._classSetupFailed" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils._deprecate">
<tt class="descname">_deprecate</tt><big>(</big><em>original_func</em><big>)</big><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils._deprecate" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils._diffThreshold">
<tt class="descname">_diffThreshold</tt><em class="property"> = 65536</em><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils._diffThreshold" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils._formatMessage">
<tt class="descname">_formatMessage</tt><big>(</big><em>msg</em>, <em>standardMsg</em><big>)</big><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils._formatMessage" title="Permalink to this definition">¶</a></dt>
<dd><p>Honour the longMessage attribute when generating failure messages.
If longMessage is False this means:
* Use only an explicit message if it is provided
* Otherwise use the standard message for the assert</p>
<p>If longMessage is True:
* Use the standard message
* If an explicit message is provided, plus &#8216; : &#8216; and the explicit message</p>
</dd></dl>

<dl class="method">
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils._getAssertEqualityFunc">
<tt class="descname">_getAssertEqualityFunc</tt><big>(</big><em>first</em>, <em>second</em><big>)</big><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils._getAssertEqualityFunc" title="Permalink to this definition">¶</a></dt>
<dd><p>Get a detailed comparison function for the types of the two args.</p>
<p>Returns: A callable accepting (first, second, msg=None) that will
raise a failure exception if first != second with a useful human
readable error message for those types.</p>
</dd></dl>

<dl class="method">
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils._truncateMessage">
<tt class="descname">_truncateMessage</tt><big>(</big><em>message</em>, <em>diff</em><big>)</big><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils._truncateMessage" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.addCleanup">
<tt class="descname">addCleanup</tt><big>(</big><em>function</em>, <em>*args</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.addCleanup" title="Permalink to this definition">¶</a></dt>
<dd><p>Add a function, with arguments, to be called when the test is
completed. Functions added are called on a LIFO basis and are
called after tearDown on test failure or success.</p>
<p>Cleanup items are called even if setUp fails (unlike tearDown).</p>
</dd></dl>

<dl class="method">
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.addTypeEqualityFunc">
<tt class="descname">addTypeEqualityFunc</tt><big>(</big><em>typeobj</em>, <em>function</em><big>)</big><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.addTypeEqualityFunc" title="Permalink to this definition">¶</a></dt>
<dd><p>Add a type specific assertEqual style function to compare a type.</p>
<p>This method is for use by TestCase subclasses that need to register
their own type equality functions to provide nicer error messages.</p>
<dl class="docutils">
<dt>Args:</dt>
<dd><dl class="first last docutils">
<dt>typeobj: The data type to call this function on when both values</dt>
<dd>are of the same type in assertEqual().</dd>
<dt>function: The callable taking two arguments and an optional</dt>
<dd>msg= argument that raises self.failureException with a
useful error message when the two arguments are not equal.</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertAlmostEqual">
<tt class="descname">assertAlmostEqual</tt><big>(</big><em>first</em>, <em>second</em>, <em>places=None</em>, <em>msg=None</em>, <em>delta=None</em><big>)</big><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertAlmostEqual" title="Permalink to this definition">¶</a></dt>
<dd><p>Fail if the two objects are unequal as determined by their
difference rounded to the given number of decimal places
(default 7) and comparing to zero, or by comparing that the
between the two objects is more than the given delta.</p>
<p>Note that decimal places (from zero) are usually not the same
as significant digits (measured from the most signficant digit).</p>
<p>If the two objects compare equal then they will automatically
compare almost equal.</p>
</dd></dl>

<dl class="method">
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertAlmostEquals">
<tt class="descname">assertAlmostEquals</tt><big>(</big><em>first</em>, <em>second</em>, <em>places=None</em>, <em>msg=None</em>, <em>delta=None</em><big>)</big><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertAlmostEquals" title="Permalink to this definition">¶</a></dt>
<dd><p>Fail if the two objects are unequal as determined by their
difference rounded to the given number of decimal places
(default 7) and comparing to zero, or by comparing that the
between the two objects is more than the given delta.</p>
<p>Note that decimal places (from zero) are usually not the same
as significant digits (measured from the most signficant digit).</p>
<p>If the two objects compare equal then they will automatically
compare almost equal.</p>
</dd></dl>

<dl class="method">
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertDictContainsSubset">
<tt class="descname">assertDictContainsSubset</tt><big>(</big><em>expected</em>, <em>actual</em>, <em>msg=None</em><big>)</big><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertDictContainsSubset" title="Permalink to this definition">¶</a></dt>
<dd><p>Checks whether actual is a superset of expected.</p>
</dd></dl>

<dl class="method">
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertDictEqual">
<tt class="descname">assertDictEqual</tt><big>(</big><em>d1</em>, <em>d2</em>, <em>msg=None</em><big>)</big><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertDictEqual" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertEqual">
<tt class="descname">assertEqual</tt><big>(</big><em>first</em>, <em>second</em>, <em>msg=None</em><big>)</big><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertEqual" title="Permalink to this definition">¶</a></dt>
<dd><p>Fail if the two objects are unequal as determined by the &#8216;==&#8217;
operator.</p>
</dd></dl>

<dl class="method">
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertEquals">
<tt class="descname">assertEquals</tt><big>(</big><em>first</em>, <em>second</em>, <em>msg=None</em><big>)</big><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertEquals" title="Permalink to this definition">¶</a></dt>
<dd><p>Fail if the two objects are unequal as determined by the &#8216;==&#8217;
operator.</p>
</dd></dl>

<dl class="method">
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertFalse">
<tt class="descname">assertFalse</tt><big>(</big><em>expr</em>, <em>msg=None</em><big>)</big><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertFalse" title="Permalink to this definition">¶</a></dt>
<dd><p>Check that the expression is false.</p>
</dd></dl>

<dl class="method">
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertGreater">
<tt class="descname">assertGreater</tt><big>(</big><em>a</em>, <em>b</em>, <em>msg=None</em><big>)</big><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertGreater" title="Permalink to this definition">¶</a></dt>
<dd><p>Just like self.assertTrue(a &gt; b), but with a nicer default message.</p>
</dd></dl>

<dl class="method">
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertGreaterEqual">
<tt class="descname">assertGreaterEqual</tt><big>(</big><em>a</em>, <em>b</em>, <em>msg=None</em><big>)</big><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertGreaterEqual" title="Permalink to this definition">¶</a></dt>
<dd><p>Just like self.assertTrue(a &gt;= b), but with a nicer default message.</p>
</dd></dl>

<dl class="method">
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertIn">
<tt class="descname">assertIn</tt><big>(</big><em>member</em>, <em>container</em>, <em>msg=None</em><big>)</big><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertIn" title="Permalink to this definition">¶</a></dt>
<dd><p>Just like self.assertTrue(a in b), but with a nicer default message.</p>
</dd></dl>

<dl class="method">
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertIs">
<tt class="descname">assertIs</tt><big>(</big><em>expr1</em>, <em>expr2</em>, <em>msg=None</em><big>)</big><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertIs" title="Permalink to this definition">¶</a></dt>
<dd><p>Just like self.assertTrue(a is b), but with a nicer default message.</p>
</dd></dl>

<dl class="method">
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertIsInstance">
<tt class="descname">assertIsInstance</tt><big>(</big><em>obj</em>, <em>cls</em>, <em>msg=None</em><big>)</big><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertIsInstance" title="Permalink to this definition">¶</a></dt>
<dd><p>Same as self.assertTrue(isinstance(obj, cls)), with a nicer
default message.</p>
</dd></dl>

<dl class="method">
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertIsNone">
<tt class="descname">assertIsNone</tt><big>(</big><em>obj</em>, <em>msg=None</em><big>)</big><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertIsNone" title="Permalink to this definition">¶</a></dt>
<dd><p>Same as self.assertTrue(obj is None), with a nicer default message.</p>
</dd></dl>

<dl class="method">
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertIsNot">
<tt class="descname">assertIsNot</tt><big>(</big><em>expr1</em>, <em>expr2</em>, <em>msg=None</em><big>)</big><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertIsNot" title="Permalink to this definition">¶</a></dt>
<dd><p>Just like self.assertTrue(a is not b), but with a nicer default message.</p>
</dd></dl>

<dl class="method">
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertIsNotNone">
<tt class="descname">assertIsNotNone</tt><big>(</big><em>obj</em>, <em>msg=None</em><big>)</big><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertIsNotNone" title="Permalink to this definition">¶</a></dt>
<dd><p>Included for symmetry with assertIsNone.</p>
</dd></dl>

<dl class="method">
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertItemsEqual">
<tt class="descname">assertItemsEqual</tt><big>(</big><em>expected_seq</em>, <em>actual_seq</em>, <em>msg=None</em><big>)</big><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertItemsEqual" title="Permalink to this definition">¶</a></dt>
<dd><p>An unordered sequence specific comparison. It asserts that
actual_seq and expected_seq have the same element counts.
Equivalent to:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="bp">self</span><span class="o">.</span><span class="n">assertEqual</span><span class="p">(</span><span class="n">Counter</span><span class="p">(</span><span class="nb">iter</span><span class="p">(</span><span class="n">actual_seq</span><span class="p">)),</span>
                 <span class="n">Counter</span><span class="p">(</span><span class="nb">iter</span><span class="p">(</span><span class="n">expected_seq</span><span class="p">)))</span>
</pre></div>
</div>
<p>Asserts that each element has the same count in both sequences.
Example:</p>
<blockquote>
<div><ul class="simple">
<li>[0, 1, 1] and [1, 0, 1] compare equal.</li>
<li>[0, 0, 1] and [0, 1] compare unequal.</li>
</ul>
</div></blockquote>
</dd></dl>

<dl class="method">
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertLess">
<tt class="descname">assertLess</tt><big>(</big><em>a</em>, <em>b</em>, <em>msg=None</em><big>)</big><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertLess" title="Permalink to this definition">¶</a></dt>
<dd><p>Just like self.assertTrue(a &lt; b), but with a nicer default message.</p>
</dd></dl>

<dl class="method">
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertLessEqual">
<tt class="descname">assertLessEqual</tt><big>(</big><em>a</em>, <em>b</em>, <em>msg=None</em><big>)</big><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertLessEqual" title="Permalink to this definition">¶</a></dt>
<dd><p>Just like self.assertTrue(a &lt;= b), but with a nicer default message.</p>
</dd></dl>

<dl class="method">
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertListEqual">
<tt class="descname">assertListEqual</tt><big>(</big><em>list1</em>, <em>list2</em>, <em>msg=None</em><big>)</big><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertListEqual" title="Permalink to this definition">¶</a></dt>
<dd><p>A list-specific equality assertion.</p>
<dl class="docutils">
<dt>Args:</dt>
<dd><p class="first">list1: The first list to compare.
list2: The second list to compare.
msg: Optional message to use on failure instead of a list of</p>
<blockquote class="last">
<div>differences.</div></blockquote>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertMultiLineEqual">
<tt class="descname">assertMultiLineEqual</tt><big>(</big><em>first</em>, <em>second</em>, <em>msg=None</em><big>)</big><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertMultiLineEqual" title="Permalink to this definition">¶</a></dt>
<dd><p>Assert that two multi-line strings are equal.</p>
</dd></dl>

<dl class="method">
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertNotAlmostEqual">
<tt class="descname">assertNotAlmostEqual</tt><big>(</big><em>first</em>, <em>second</em>, <em>places=None</em>, <em>msg=None</em>, <em>delta=None</em><big>)</big><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertNotAlmostEqual" title="Permalink to this definition">¶</a></dt>
<dd><p>Fail if the two objects are equal as determined by their
difference rounded to the given number of decimal places
(default 7) and comparing to zero, or by comparing that the
between the two objects is less than the given delta.</p>
<p>Note that decimal places (from zero) are usually not the same
as significant digits (measured from the most signficant digit).</p>
<p>Objects that are equal automatically fail.</p>
</dd></dl>

<dl class="method">
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertNotAlmostEquals">
<tt class="descname">assertNotAlmostEquals</tt><big>(</big><em>first</em>, <em>second</em>, <em>places=None</em>, <em>msg=None</em>, <em>delta=None</em><big>)</big><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertNotAlmostEquals" title="Permalink to this definition">¶</a></dt>
<dd><p>Fail if the two objects are equal as determined by their
difference rounded to the given number of decimal places
(default 7) and comparing to zero, or by comparing that the
between the two objects is less than the given delta.</p>
<p>Note that decimal places (from zero) are usually not the same
as significant digits (measured from the most signficant digit).</p>
<p>Objects that are equal automatically fail.</p>
</dd></dl>

<dl class="method">
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertNotEqual">
<tt class="descname">assertNotEqual</tt><big>(</big><em>first</em>, <em>second</em>, <em>msg=None</em><big>)</big><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertNotEqual" title="Permalink to this definition">¶</a></dt>
<dd><p>Fail if the two objects are equal as determined by the &#8216;!=&#8217;
operator.</p>
</dd></dl>

<dl class="method">
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertNotEquals">
<tt class="descname">assertNotEquals</tt><big>(</big><em>first</em>, <em>second</em>, <em>msg=None</em><big>)</big><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertNotEquals" title="Permalink to this definition">¶</a></dt>
<dd><p>Fail if the two objects are equal as determined by the &#8216;!=&#8217;
operator.</p>
</dd></dl>

<dl class="method">
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertNotIn">
<tt class="descname">assertNotIn</tt><big>(</big><em>member</em>, <em>container</em>, <em>msg=None</em><big>)</big><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertNotIn" title="Permalink to this definition">¶</a></dt>
<dd><p>Just like self.assertTrue(a not in b), but with a nicer default message.</p>
</dd></dl>

<dl class="method">
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertNotIsInstance">
<tt class="descname">assertNotIsInstance</tt><big>(</big><em>obj</em>, <em>cls</em>, <em>msg=None</em><big>)</big><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertNotIsInstance" title="Permalink to this definition">¶</a></dt>
<dd><p>Included for symmetry with assertIsInstance.</p>
</dd></dl>

<dl class="method">
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertNotRegexpMatches">
<tt class="descname">assertNotRegexpMatches</tt><big>(</big><em>text</em>, <em>unexpected_regexp</em>, <em>msg=None</em><big>)</big><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertNotRegexpMatches" title="Permalink to this definition">¶</a></dt>
<dd><p>Fail the test if the text matches the regular expression.</p>
</dd></dl>

<dl class="method">
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertRaises">
<tt class="descname">assertRaises</tt><big>(</big><em>excClass</em>, <em>callableObj=None</em>, <em>*args</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertRaises" title="Permalink to this definition">¶</a></dt>
<dd><p>Fail unless an exception of class excClass is raised
by callableObj when invoked with arguments args and keyword
arguments kwargs. If a different type of exception is
raised, it will not be caught, and the test case will be
deemed to have suffered an error, exactly as for an
unexpected exception.</p>
<p>If called with callableObj omitted or None, will return a
context object used like this:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="k">with</span> <span class="bp">self</span><span class="o">.</span><span class="n">assertRaises</span><span class="p">(</span><span class="n">SomeException</span><span class="p">):</span>
    <span class="n">do_something</span><span class="p">()</span>
</pre></div>
</div>
<p>The context manager keeps a reference to the exception as
the &#8216;exception&#8217; attribute. This allows you to inspect the
exception after the assertion:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="k">with</span> <span class="bp">self</span><span class="o">.</span><span class="n">assertRaises</span><span class="p">(</span><span class="n">SomeException</span><span class="p">)</span> <span class="k">as</span> <span class="n">cm</span><span class="p">:</span>
    <span class="n">do_something</span><span class="p">()</span>
<span class="n">the_exception</span> <span class="o">=</span> <span class="n">cm</span><span class="o">.</span><span class="n">exception</span>
<span class="bp">self</span><span class="o">.</span><span class="n">assertEqual</span><span class="p">(</span><span class="n">the_exception</span><span class="o">.</span><span class="n">error_code</span><span class="p">,</span> <span class="mi">3</span><span class="p">)</span>
</pre></div>
</div>
</dd></dl>

<dl class="method">
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertRaisesRegexp">
<tt class="descname">assertRaisesRegexp</tt><big>(</big><em>expected_exception</em>, <em>expected_regexp</em>, <em>callable_obj=None</em>, <em>*args</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertRaisesRegexp" title="Permalink to this definition">¶</a></dt>
<dd><p>Asserts that the message in a raised exception matches a regexp.</p>
<dl class="docutils">
<dt>Args:</dt>
<dd><p class="first">expected_exception: Exception class expected to be raised.
expected_regexp: Regexp (re pattern object or string) expected</p>
<blockquote>
<div>to be found in error message.</div></blockquote>
<p class="last">callable_obj: Function to be called.
args: Extra args.
kwargs: Extra kwargs.</p>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertRegexpMatches">
<tt class="descname">assertRegexpMatches</tt><big>(</big><em>text</em>, <em>expected_regexp</em>, <em>msg=None</em><big>)</big><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertRegexpMatches" title="Permalink to this definition">¶</a></dt>
<dd><p>Fail the test unless the text matches the regular expression.</p>
</dd></dl>

<dl class="method">
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertSequenceEqual">
<tt class="descname">assertSequenceEqual</tt><big>(</big><em>seq1</em>, <em>seq2</em>, <em>msg=None</em>, <em>seq_type=None</em><big>)</big><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertSequenceEqual" title="Permalink to this definition">¶</a></dt>
<dd><p>An equality assertion for ordered sequences (like lists and tuples).</p>
<p>For the purposes of this function, a valid ordered sequence type is one
which can be indexed, has a length, and has an equality operator.</p>
<dl class="docutils">
<dt>Args:</dt>
<dd><p class="first">seq1: The first sequence to compare.
seq2: The second sequence to compare.
seq_type: The expected datatype of the sequences, or None if no</p>
<blockquote>
<div>datatype should be enforced.</div></blockquote>
<dl class="last docutils">
<dt>msg: Optional message to use on failure instead of a list of</dt>
<dd>differences.</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertSetEqual">
<tt class="descname">assertSetEqual</tt><big>(</big><em>set1</em>, <em>set2</em>, <em>msg=None</em><big>)</big><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertSetEqual" title="Permalink to this definition">¶</a></dt>
<dd><p>A set-specific equality assertion.</p>
<dl class="docutils">
<dt>Args:</dt>
<dd><p class="first">set1: The first set to compare.
set2: The second set to compare.
msg: Optional message to use on failure instead of a list of</p>
<blockquote class="last">
<div>differences.</div></blockquote>
</dd>
</dl>
<p>assertSetEqual uses ducktyping to support different types of sets, and
is optimized for sets specifically (parameters must support a
difference method).</p>
</dd></dl>

<dl class="method">
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertTrue">
<tt class="descname">assertTrue</tt><big>(</big><em>expr</em>, <em>msg=None</em><big>)</big><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertTrue" title="Permalink to this definition">¶</a></dt>
<dd><p>Check that the expression is true.</p>
</dd></dl>

<dl class="method">
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertTupleEqual">
<tt class="descname">assertTupleEqual</tt><big>(</big><em>tuple1</em>, <em>tuple2</em>, <em>msg=None</em><big>)</big><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assertTupleEqual" title="Permalink to this definition">¶</a></dt>
<dd><p>A tuple-specific equality assertion.</p>
<dl class="docutils">
<dt>Args:</dt>
<dd><p class="first">tuple1: The first tuple to compare.
tuple2: The second tuple to compare.
msg: Optional message to use on failure instead of a list of</p>
<blockquote class="last">
<div>differences.</div></blockquote>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assert_">
<tt class="descname">assert_</tt><big>(</big><em>expr</em>, <em>msg=None</em><big>)</big><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.assert_" title="Permalink to this definition">¶</a></dt>
<dd><p>Check that the expression is true.</p>
</dd></dl>

<dl class="method">
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.countTestCases">
<tt class="descname">countTestCases</tt><big>(</big><big>)</big><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.countTestCases" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.debug">
<tt class="descname">debug</tt><big>(</big><big>)</big><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.debug" title="Permalink to this definition">¶</a></dt>
<dd><p>Run the test without collecting errors in a TestResult</p>
</dd></dl>

<dl class="method">
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.defaultTestResult">
<tt class="descname">defaultTestResult</tt><big>(</big><big>)</big><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.defaultTestResult" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.doCleanups">
<tt class="descname">doCleanups</tt><big>(</big><big>)</big><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.doCleanups" title="Permalink to this definition">¶</a></dt>
<dd><p>Execute all cleanup functions. Normally called for you after
tearDown.</p>
</dd></dl>

<dl class="method">
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.fail">
<tt class="descname">fail</tt><big>(</big><em>msg=None</em><big>)</big><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.fail" title="Permalink to this definition">¶</a></dt>
<dd><p>Fail immediately, with the given message.</p>
</dd></dl>

<dl class="method">
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.failIf">
<tt class="descname">failIf</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.failIf" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.failIfAlmostEqual">
<tt class="descname">failIfAlmostEqual</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.failIfAlmostEqual" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.failIfEqual">
<tt class="descname">failIfEqual</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.failIfEqual" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.failUnless">
<tt class="descname">failUnless</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.failUnless" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.failUnlessAlmostEqual">
<tt class="descname">failUnlessAlmostEqual</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.failUnlessAlmostEqual" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.failUnlessEqual">
<tt class="descname">failUnlessEqual</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.failUnlessEqual" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.failUnlessRaises">
<tt class="descname">failUnlessRaises</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.failUnlessRaises" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.failureException">
<tt class="descname">failureException</tt><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.failureException" title="Permalink to this definition">¶</a></dt>
<dd><p>alias of <tt class="xref py py-class docutils literal"><span class="pre">AssertionError</span></tt></p>
</dd></dl>

<dl class="method">
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.id">
<tt class="descname">id</tt><big>(</big><big>)</big><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.id" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.longMessage">
<tt class="descname">longMessage</tt><em class="property"> = False</em><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.longMessage" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.maxDiff">
<tt class="descname">maxDiff</tt><em class="property"> = 640</em><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.maxDiff" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.run">
<tt class="descname">run</tt><big>(</big><em>result=None</em><big>)</big><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.run" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.setUp">
<tt class="descname">setUp</tt><big>(</big><big>)</big><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.setUp" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="classmethod">
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.setUpClass">
<em class="property">classmethod </em><tt class="descname">setUpClass</tt><big>(</big><big>)</big><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.setUpClass" title="Permalink to this definition">¶</a></dt>
<dd><p>Hook method for setting up class fixture before running tests in the class.</p>
</dd></dl>

<dl class="method">
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.shortDescription">
<tt class="descname">shortDescription</tt><big>(</big><big>)</big><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.shortDescription" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns a one-line description of the test, or None if no
description has been provided.</p>
<p>The default implementation of this method returns the first line of
the specified test method&#8217;s docstring.</p>
</dd></dl>

<dl class="method">
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.skipTest">
<tt class="descname">skipTest</tt><big>(</big><em>reason</em><big>)</big><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.skipTest" title="Permalink to this definition">¶</a></dt>
<dd><p>Skip this test.</p>
</dd></dl>

<dl class="method">
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.tearDown">
<tt class="descname">tearDown</tt><big>(</big><big>)</big><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.tearDown" title="Permalink to this definition">¶</a></dt>
<dd><p>Hook method for deconstructing the test fixture after testing it.</p>
</dd></dl>

<dl class="classmethod">
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.tearDownClass">
<em class="property">classmethod </em><tt class="descname">tearDownClass</tt><big>(</big><big>)</big><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.tearDownClass" title="Permalink to this definition">¶</a></dt>
<dd><p>Hook method for deconstructing the class fixture after running all tests in the class.</p>
</dd></dl>

<dl class="method">
<dt id="virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.test_padding">
<tt class="descname">test_padding</tt><big>(</big><big>)</big><a class="headerlink" href="#virtualsmartcard.tests.CryptoUtils_test.TestCryptoUtils.test_padding" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

</div>


    </div>
      
  </div>
</div>
<footer class="footer">
  <div class="container">
    <p class="pull-right">
      <a href="#">Back to top</a>
      
    </p>
    <p>
        &copy; Copyright 2009-2017 by Dominik Oepen and Frank Morgner.<br/>
    </p>
  </div>
</footer>
  </body>
</html>